SD CARD Q&A

Q1: How does the SSD210 demo board support SD card?

SSD210 is QFN68, with limited pins, SD card and LCD share pins. The software is configured with TTL panel by default, so SD card is not supported. If you need, please refer to the following modifications.

The hardware of the 68Pin yellow board needs to add pull-up resistors R178~R183 to SD_CLK/SD_CMD/SD_D0/SD_D1/SD_D2/SD_D3. The demo board defaults to NC.

  1. DTS configs

    arch/arm/boot/dts/pioneer3-ssc021a-s01a-demo-padmux.dtsi
    

    Modify #if 0 to#if 1.

    arch/arm/boot/dts/pioneer3-ssc021a-s01a-demo.dts
    

    Reopen the marked place below.

  2. For hardware changes, please refer to QFN68 Demo Board TF Card(SDIO) Rework Note

Q2: If there is no config or detection pin (CDZ) on HW, how to configure them?

Kernel changes:

Modify dts slot-fakecdzs = <0>,<0>,<0>; to slot-fakecdzs = <1>,<0>,<0>;

Uboot changes:

Combine the following commits and open SDMMC_FAKE_CDZ

diff --git a/drivers/mstar/Kconfig b/drivers/mstar/Kconfig
index bd567d4..cd8f1c1 100755
--- a/drivers/mstar/Kconfig
+++ b/drivers/mstar/Kconfig
@@ -20,6 +20,10 @@
config MS_SDMMC
    bool 'MSTAR SDMMC'

+config SDMMC_FAKE_CDZ
+    depends on MS_SDMMC
+    bool 'FAKE_CDZ'
+
config MS_EMMC
    bool 'MSTAR eMMC'

diff --git a/drivers/mstar/sdmmc/ms_sdmmc_drv.c b/drivers/mstar/sdmmc/ms_sdmmc_drv.c
index b55a775..96c9681 100755
--- a/drivers/mstar/sdmmc/ms_sdmmc_drv.c
+++ b/drivers/mstar/sdmmc/ms_sdmmc_drv.c
@@ -666,8 +666,11 @@
    //IPEmType eIP = ge_IPSlot[u8Slot];

    SDMMC_SwitchPAD(u8Slot);
-
-   return Hal_CARD_GetGPIOState((GPIOEmType)u8Slot);
+#ifdef CONFIG_SDMMC_FAKE_CDZ
+    return TRUE;
+#else
+    return Hal_CARD_GetGPIOState((GPIOEmType)u8Slot);
+#endif
}

diff --git a/drivers/mstar/sdmmc/ms_sdmmc_ub.c b/drivers/mstar/sdmmc/ms_sdmmc_ub.c
old mode 100644
new mode 100755
index 548923e..a44409e
--- a/drivers/mstar/sdmmc/ms_sdmmc_ub.c
+++ b/drivers/mstar/sdmmc/ms_sdmmc_ub.c
@@ -101,7 +101,11 @@
//------------------------------------------------------------------------------------------------
static U8_T _CardDetect(SlotEmType eSlot)
{
+#ifdef CONFIG_SDMMC_FAKE_CDZ
+    return TRUE;
+#else
    return Hal_CARD_GetGPIOState((GPIOEmType)eSlot);
+#endif
}

...